﻿using Microsoft.AspNetCore.Mvc;
using SportsPlatform.Base;
using SportsPlatform.Dto.PermissionManagement.CompanyInfo;
using SportsPlatform.Dto.SportBusiness.RegistrationInfo;
using SportsPlatform.Enums;
using SportsPlatform.Filters;
using SportsPlatform.PermissionManagement.IPermissionManagement;
using SportsPlatform.Query.PermissionManagement.CompanyInfo;
using SportsPlatform.Query.SportBusiness.RegistrationInfo;
using SportsPlatform.SportBusiness.ISportBusiness;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SportsPlatform.Controllers
{
    /// <summary>
    /// 
    /// </summary>

    [ActionAuthorization]
    [Route("api/[controller]/[action]")]
    public class CompanyInfoController : SportsPlatformControllerBase
    {
        private ICompanyInfoService _service;
        /// <summary>
        /// 
        /// </summary>
        /// <param name="service"></param>
        public CompanyInfoController(ICompanyInfoService service)
        {
            this._service = service;
        }

        ///// <summary>
        ///// 比赛规则信息列表
        ///// </summary>
        ///// <param name="Query"></param>
        //[HttpPost]
        //[Log(OperationType.QueryList)]
        //public async Task<PagePagingDto<GetCompanyInfoDto>> GetCompanyInfoListPage([FromBody] GetCompanyInfoPageQuery Query)
        //{
        //    return await _service.GetCompanyInfoListPage(Query);
        //}

        /// <summary>
        /// 更新审核信息
        /// </summary>
        /// <param name="Query"></param>
        [HttpPost]
        [Log(OperationType.EditEntity)]
        public async Task<BaseResultDto> ApprovalCompanyInfo(ApprovalCompanyInfoQuery Query)
        {
            return await _service.ApprovalCompanyInfo(Query);
        }
    }
}
